3.150 \(\int \frac{(d+e x) (f+g x+h x^2)}{a+b x+c x^2} \, dx\)

Optimal. Leaf size=177 \[ \frac{\log \left (a+b x+c x^2\right ) \left (-c (a e h+b d h+b e g)+b^2 e h+c^2 (d g+e f)\right )}{2 c^3}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (-c^2 (2 a d h+2 a e g+b d g+b e f)+b c (3 a e h+b d h+b e g)+b^3 (-e) h+2 c^3 d f\right )}{c^3 \sqrt{b^2-4 a c}}+\frac{x (-b e h+c d h+c e g)}{c^2}+\frac{e h x^2}{2 c} \]

[Out]

((c*e*g + c*d*h - b*e*h)*x)/c^2 + (e*h*x^2)/(2*c) - ((2*c^3*d*f - b^3*e*h - c^2*(b*e*f + b*d*g + 2*a*e*g + 2*a
*d*h) + b*c*(b*e*g + b*d*h + 3*a*e*h))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(c^3*Sqrt[b^2 - 4*a*c]) + ((c^2
*(e*f + d*g) + b^2*e*h - c*(b*e*g + b*d*h + a*e*h))*Log[a + b*x + c*x^2])/(2*c^3)

________________________________________________________________________________________

Rubi [A]  time = 0.349583, antiderivative size = 177, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {1628, 634, 618, 206, 628} \[ \frac{\log \left (a+b x+c x^2\right ) \left (-c (a e h+b d h+b e g)+b^2 e h+c^2 (d g+e f)\right )}{2 c^3}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (-c^2 (2 a d h+2 a e g+b d g+b e f)+b c (3 a e h+b d h+b e g)+b^3 (-e) h+2 c^3 d f\right )}{c^3 \sqrt{b^2-4 a c}}+\frac{x (-b e h+c d h+c e g)}{c^2}+\frac{e h x^2}{2 c} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(f + g*x + h*x^2))/(a + b*x + c*x^2),x]

[Out]

((c*e*g + c*d*h - b*e*h)*x)/c^2 + (e*h*x^2)/(2*c) - ((2*c^3*d*f - b^3*e*h - c^2*(b*e*f + b*d*g + 2*a*e*g + 2*a
*d*h) + b*c*(b*e*g + b*d*h + 3*a*e*h))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(c^3*Sqrt[b^2 - 4*a*c]) + ((c^2
*(e*f + d*g) + b^2*e*h - c*(b*e*g + b*d*h + a*e*h))*Log[a + b*x + c*x^2])/(2*c^3)

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{(d+e x) \left (f+g x+h x^2\right )}{a+b x+c x^2} \, dx &=\int \left (\frac{c e g+c d h-b e h}{c^2}+\frac{e h x}{c}+\frac{c^2 d f+a b e h-a c (e g+d h)+\left (c^2 (e f+d g)+b^2 e h-c (b e g+b d h+a e h)\right ) x}{c^2 \left (a+b x+c x^2\right )}\right ) \, dx\\ &=\frac{(c e g+c d h-b e h) x}{c^2}+\frac{e h x^2}{2 c}+\frac{\int \frac{c^2 d f+a b e h-a c (e g+d h)+\left (c^2 (e f+d g)+b^2 e h-c (b e g+b d h+a e h)\right ) x}{a+b x+c x^2} \, dx}{c^2}\\ &=\frac{(c e g+c d h-b e h) x}{c^2}+\frac{e h x^2}{2 c}+\frac{\left (c^2 (e f+d g)+b^2 e h-c (b e g+b d h+a e h)\right ) \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 c^3}+\frac{\left (2 c^3 d f-b^3 e h-c^2 (b e f+b d g+2 a e g+2 a d h)+b c (b e g+b d h+3 a e h)\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 c^3}\\ &=\frac{(c e g+c d h-b e h) x}{c^2}+\frac{e h x^2}{2 c}+\frac{\left (c^2 (e f+d g)+b^2 e h-c (b e g+b d h+a e h)\right ) \log \left (a+b x+c x^2\right )}{2 c^3}-\frac{\left (2 c^3 d f-b^3 e h-c^2 (b e f+b d g+2 a e g+2 a d h)+b c (b e g+b d h+3 a e h)\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c^3}\\ &=\frac{(c e g+c d h-b e h) x}{c^2}+\frac{e h x^2}{2 c}-\frac{\left (2 c^3 d f-b^3 e h-c^2 (b e f+b d g+2 a e g+2 a d h)+b c (b e g+b d h+3 a e h)\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c^3 \sqrt{b^2-4 a c}}+\frac{\left (c^2 (e f+d g)+b^2 e h-c (b e g+b d h+a e h)\right ) \log \left (a+b x+c x^2\right )}{2 c^3}\\ \end{align*}

Mathematica [A]  time = 0.210293, size = 173, normalized size = 0.98 \[ \frac{\log (a+x (b+c x)) \left (-c (a e h+b d h+b e g)+b^2 e h+c^2 (d g+e f)\right )-\frac{2 \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right ) \left (c^2 (2 a d h+2 a e g+b d g+b e f)-b c (3 a e h+b d h+b e g)+b^3 e h-2 c^3 d f\right )}{\sqrt{4 a c-b^2}}+2 c x (-b e h+c d h+c e g)+c^2 e h x^2}{2 c^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(f + g*x + h*x^2))/(a + b*x + c*x^2),x]

[Out]

(2*c*(c*e*g + c*d*h - b*e*h)*x + c^2*e*h*x^2 - (2*(-2*c^3*d*f + b^3*e*h + c^2*(b*e*f + b*d*g + 2*a*e*g + 2*a*d
*h) - b*c*(b*e*g + b*d*h + 3*a*e*h))*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + (c^2*(e*f +
d*g) + b^2*e*h - c*(b*e*g + b*d*h + a*e*h))*Log[a + x*(b + c*x)])/(2*c^3)

________________________________________________________________________________________

Maple [B]  time = 0.18, size = 510, normalized size = 2.9 \begin{align*}{\frac{eh{x}^{2}}{2\,c}}-{\frac{behx}{{c}^{2}}}+{\frac{dhx}{c}}+{\frac{egx}{c}}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ) aeh}{2\,{c}^{2}}}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ){b}^{2}eh}{2\,{c}^{3}}}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ) bdh}{2\,{c}^{2}}}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ) beg}{2\,{c}^{2}}}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ) dg}{2\,c}}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ) ef}{2\,c}}+3\,{\frac{abeh}{{c}^{2}\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-2\,{\frac{adh}{c\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-2\,{\frac{aeg}{c\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+2\,{\frac{df}{\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-{\frac{{b}^{3}eh}{{c}^{3}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+{\frac{{b}^{2}dh}{{c}^{2}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}+{\frac{{b}^{2}eg}{{c}^{2}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bdg}{c}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bef}{c}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(h*x^2+g*x+f)/(c*x^2+b*x+a),x)

[Out]

1/2*e*h*x^2/c-1/c^2*b*e*h*x+1/c*d*h*x+1/c*e*g*x-1/2/c^2*ln(c*x^2+b*x+a)*a*e*h+1/2/c^3*ln(c*x^2+b*x+a)*b^2*e*h-
1/2/c^2*ln(c*x^2+b*x+a)*b*d*h-1/2/c^2*ln(c*x^2+b*x+a)*b*e*g+1/2/c*ln(c*x^2+b*x+a)*d*g+1/2/c*ln(c*x^2+b*x+a)*e*
f+3/c^2/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*a*b*e*h-2/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(
4*a*c-b^2)^(1/2))*a*d*h-2/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*a*e*g+2/(4*a*c-b^2)^(1/2)*ar
ctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*d*f-1/c^3/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b^3*e*h+1/c^
2/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b^2*d*h+1/c^2/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*
c-b^2)^(1/2))*b^2*e*g-1/c/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b*d*g-1/c/(4*a*c-b^2)^(1/2)*ar
ctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b*e*f

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(h*x^2+g*x+f)/(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.02193, size = 1361, normalized size = 7.69 \begin{align*} \left [\frac{{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e h x^{2} + \sqrt{b^{2} - 4 \, a c}{\left ({\left (2 \, c^{3} d - b c^{2} e\right )} f -{\left (b c^{2} d -{\left (b^{2} c - 2 \, a c^{2}\right )} e\right )} g +{\left ({\left (b^{2} c - 2 \, a c^{2}\right )} d -{\left (b^{3} - 3 \, a b c\right )} e\right )} h\right )} \log \left (\frac{2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt{b^{2} - 4 \, a c}{\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + 2 \,{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e g +{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (b^{3} c - 4 \, a b c^{2}\right )} e\right )} h\right )} x +{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e f +{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (b^{3} c - 4 \, a b c^{2}\right )} e\right )} g -{\left ({\left (b^{3} c - 4 \, a b c^{2}\right )} d -{\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} e\right )} h\right )} \log \left (c x^{2} + b x + a\right )}{2 \,{\left (b^{2} c^{3} - 4 \, a c^{4}\right )}}, \frac{{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e h x^{2} - 2 \, \sqrt{-b^{2} + 4 \, a c}{\left ({\left (2 \, c^{3} d - b c^{2} e\right )} f -{\left (b c^{2} d -{\left (b^{2} c - 2 \, a c^{2}\right )} e\right )} g +{\left ({\left (b^{2} c - 2 \, a c^{2}\right )} d -{\left (b^{3} - 3 \, a b c\right )} e\right )} h\right )} \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \,{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e g +{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (b^{3} c - 4 \, a b c^{2}\right )} e\right )} h\right )} x +{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} e f +{\left ({\left (b^{2} c^{2} - 4 \, a c^{3}\right )} d -{\left (b^{3} c - 4 \, a b c^{2}\right )} e\right )} g -{\left ({\left (b^{3} c - 4 \, a b c^{2}\right )} d -{\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} e\right )} h\right )} \log \left (c x^{2} + b x + a\right )}{2 \,{\left (b^{2} c^{3} - 4 \, a c^{4}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(h*x^2+g*x+f)/(c*x^2+b*x+a),x, algorithm="fricas")

[Out]

[1/2*((b^2*c^2 - 4*a*c^3)*e*h*x^2 + sqrt(b^2 - 4*a*c)*((2*c^3*d - b*c^2*e)*f - (b*c^2*d - (b^2*c - 2*a*c^2)*e)
*g + ((b^2*c - 2*a*c^2)*d - (b^3 - 3*a*b*c)*e)*h)*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*(
2*c*x + b))/(c*x^2 + b*x + a)) + 2*((b^2*c^2 - 4*a*c^3)*e*g + ((b^2*c^2 - 4*a*c^3)*d - (b^3*c - 4*a*b*c^2)*e)*
h)*x + ((b^2*c^2 - 4*a*c^3)*e*f + ((b^2*c^2 - 4*a*c^3)*d - (b^3*c - 4*a*b*c^2)*e)*g - ((b^3*c - 4*a*b*c^2)*d -
 (b^4 - 5*a*b^2*c + 4*a^2*c^2)*e)*h)*log(c*x^2 + b*x + a))/(b^2*c^3 - 4*a*c^4), 1/2*((b^2*c^2 - 4*a*c^3)*e*h*x
^2 - 2*sqrt(-b^2 + 4*a*c)*((2*c^3*d - b*c^2*e)*f - (b*c^2*d - (b^2*c - 2*a*c^2)*e)*g + ((b^2*c - 2*a*c^2)*d -
(b^3 - 3*a*b*c)*e)*h)*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) + 2*((b^2*c^2 - 4*a*c^3)*e*g + ((b
^2*c^2 - 4*a*c^3)*d - (b^3*c - 4*a*b*c^2)*e)*h)*x + ((b^2*c^2 - 4*a*c^3)*e*f + ((b^2*c^2 - 4*a*c^3)*d - (b^3*c
 - 4*a*b*c^2)*e)*g - ((b^3*c - 4*a*b*c^2)*d - (b^4 - 5*a*b^2*c + 4*a^2*c^2)*e)*h)*log(c*x^2 + b*x + a))/(b^2*c
^3 - 4*a*c^4)]

________________________________________________________________________________________

Sympy [B]  time = 12.0705, size = 1265, normalized size = 7.15 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(h*x**2+g*x+f)/(c*x**2+b*x+a),x)

[Out]

(-sqrt(-4*a*c + b**2)*(3*a*b*c*e*h - 2*a*c**2*d*h - 2*a*c**2*e*g - b**3*e*h + b**2*c*d*h + b**2*c*e*g - b*c**2
*d*g - b*c**2*e*f + 2*c**3*d*f)/(2*c**3*(4*a*c - b**2)) - (a*c*e*h - b**2*e*h + b*c*d*h + b*c*e*g - c**2*d*g -
 c**2*e*f)/(2*c**3))*log(x + (2*a**2*c*e*h - a*b**2*e*h + a*b*c*d*h + a*b*c*e*g + 4*a*c**3*(-sqrt(-4*a*c + b**
2)*(3*a*b*c*e*h - 2*a*c**2*d*h - 2*a*c**2*e*g - b**3*e*h + b**2*c*d*h + b**2*c*e*g - b*c**2*d*g - b*c**2*e*f +
 2*c**3*d*f)/(2*c**3*(4*a*c - b**2)) - (a*c*e*h - b**2*e*h + b*c*d*h + b*c*e*g - c**2*d*g - c**2*e*f)/(2*c**3)
) - 2*a*c**2*d*g - 2*a*c**2*e*f - b**2*c**2*(-sqrt(-4*a*c + b**2)*(3*a*b*c*e*h - 2*a*c**2*d*h - 2*a*c**2*e*g -
 b**3*e*h + b**2*c*d*h + b**2*c*e*g - b*c**2*d*g - b*c**2*e*f + 2*c**3*d*f)/(2*c**3*(4*a*c - b**2)) - (a*c*e*h
 - b**2*e*h + b*c*d*h + b*c*e*g - c**2*d*g - c**2*e*f)/(2*c**3)) + b*c**2*d*f)/(3*a*b*c*e*h - 2*a*c**2*d*h - 2
*a*c**2*e*g - b**3*e*h + b**2*c*d*h + b**2*c*e*g - b*c**2*d*g - b*c**2*e*f + 2*c**3*d*f)) + (sqrt(-4*a*c + b**
2)*(3*a*b*c*e*h - 2*a*c**2*d*h - 2*a*c**2*e*g - b**3*e*h + b**2*c*d*h + b**2*c*e*g - b*c**2*d*g - b*c**2*e*f +
 2*c**3*d*f)/(2*c**3*(4*a*c - b**2)) - (a*c*e*h - b**2*e*h + b*c*d*h + b*c*e*g - c**2*d*g - c**2*e*f)/(2*c**3)
)*log(x + (2*a**2*c*e*h - a*b**2*e*h + a*b*c*d*h + a*b*c*e*g + 4*a*c**3*(sqrt(-4*a*c + b**2)*(3*a*b*c*e*h - 2*
a*c**2*d*h - 2*a*c**2*e*g - b**3*e*h + b**2*c*d*h + b**2*c*e*g - b*c**2*d*g - b*c**2*e*f + 2*c**3*d*f)/(2*c**3
*(4*a*c - b**2)) - (a*c*e*h - b**2*e*h + b*c*d*h + b*c*e*g - c**2*d*g - c**2*e*f)/(2*c**3)) - 2*a*c**2*d*g - 2
*a*c**2*e*f - b**2*c**2*(sqrt(-4*a*c + b**2)*(3*a*b*c*e*h - 2*a*c**2*d*h - 2*a*c**2*e*g - b**3*e*h + b**2*c*d*
h + b**2*c*e*g - b*c**2*d*g - b*c**2*e*f + 2*c**3*d*f)/(2*c**3*(4*a*c - b**2)) - (a*c*e*h - b**2*e*h + b*c*d*h
 + b*c*e*g - c**2*d*g - c**2*e*f)/(2*c**3)) + b*c**2*d*f)/(3*a*b*c*e*h - 2*a*c**2*d*h - 2*a*c**2*e*g - b**3*e*
h + b**2*c*d*h + b**2*c*e*g - b*c**2*d*g - b*c**2*e*f + 2*c**3*d*f)) + e*h*x**2/(2*c) - x*(b*e*h - c*d*h - c*e
*g)/c**2

________________________________________________________________________________________

Giac [A]  time = 1.23855, size = 271, normalized size = 1.53 \begin{align*} \frac{c h x^{2} e + 2 \, c d h x + 2 \, c g x e - 2 \, b h x e}{2 \, c^{2}} + \frac{{\left (c^{2} d g - b c d h + c^{2} f e - b c g e + b^{2} h e - a c h e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c^{3}} + \frac{{\left (2 \, c^{3} d f - b c^{2} d g + b^{2} c d h - 2 \, a c^{2} d h - b c^{2} f e + b^{2} c g e - 2 \, a c^{2} g e - b^{3} h e + 3 \, a b c h e\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(h*x^2+g*x+f)/(c*x^2+b*x+a),x, algorithm="giac")

[Out]

1/2*(c*h*x^2*e + 2*c*d*h*x + 2*c*g*x*e - 2*b*h*x*e)/c^2 + 1/2*(c^2*d*g - b*c*d*h + c^2*f*e - b*c*g*e + b^2*h*e
 - a*c*h*e)*log(c*x^2 + b*x + a)/c^3 + (2*c^3*d*f - b*c^2*d*g + b^2*c*d*h - 2*a*c^2*d*h - b*c^2*f*e + b^2*c*g*
e - 2*a*c^2*g*e - b^3*h*e + 3*a*b*c*h*e)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*c^3)